package example;

import org.pi4.locutil.GeoPosition;
import org.pi4.locutil.trace.TraceEntry;

public class EntryDistance implements Comparable<EntryDistance>{

	public EntryDistance(TraceEntry entry, double distance) {
		super();
		this._entry = entry;
		this._distance = distance;
		this._position = entry.getGeoPosition();
	}

	private TraceEntry _entry;
	private double _distance;
	private GeoPosition _position;
	
	public TraceEntry get_entry() {
		return _entry;
	}

	public void set_entry(TraceEntry _entry) {
		this._entry = _entry;
	}

	public double get_distance() {
		return _distance;
	}

	public void set_distance(double _distance) {
		this._distance = _distance;
	}

	@Override
	public int compareTo(EntryDistance arg0) {
		// TODO Auto-generated method stub
		if(arg0.get_distance() > this._distance)
			return 1;
		else if(arg0.get_distance() < this._distance)
			return -1;
		else
			return 0;
	}

	public void set_position(GeoPosition _position) {
		this._position = _position;
	}

	public GeoPosition get_position() {
		return _position;
	}
}
